{extend name="public:base" /}

{block name="content"}
<div class="page-header">
	<h1>	
		{$breadcrumb1}
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$breadcrumb2}
		</small>
	</h1>
</div>	

<table class="table table-striped table-bordered table-hover search-form">
	<thead>
	<tr>
		<th style="padding-left: 30px">
			<input name="holiday_time" type="date" style="width: 200px;" placeholder="节假日期" value="{:input('param.holiday_time')}" />
			<a class="btn btn-primary" href="javascript:;" id="search" url="{:url('Variety/add_holiday')}">新增节假日期</a>
		</th>
	</tr>
	</thead>
</table>
	
	
<div class="row">
	<div class="col-xs-12">	
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>		
						<th>ID</th>									
						<th>日期</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
						{volist name="list" id="d" empty="$empty"}
						<tr>		
							<td>{$d.id}</td>					
							<td>{$d.date_dt}</td>
							<td>
								<a class="delete btn btn-xs btn-danger" href='{:url("variety/delete_holiday",array("id"=>$d["id"]))}' >
									<i class="fa fa-trash bigger-120"></i>
								</a>

							</td>
						</tr>
						{/volist}	
						
						<tr>
						</tr>
				</tbody>
				
			</table>
		</div>
	</div>
</div>
{/block}
{block name="javascript"}
<script>	
$(function(){
   $("#search").click(function () {
        var url = $(this).attr('url');
        var query = $('.search-form').find('input,select').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
        query = query.replace(/^&/g, '');
        if (url.indexOf('?') > 0) {
            url += '&' + query;
        } else {
            url += '?' + query;
        }
        window.location.href = url;
    });	
});
</script>
{/block}